<?php require_once('Connections/connection.php'); ?>
<?php require_once('mysql2json.class.php'); ?>
<?php
$amphur_id = $_GET['amphur_id'];

mysql_select_db($database_connection, $connection);
$query_rs_tambon = "SELECT * FROM tbl_tambon WHERE amphur_id = ". $amphur_id ."  ORDER BY tambon_name ASC";
$rs_tambon = mysql_query($query_rs_tambon, $connection) or die(mysql_error());
$num = mysql_affected_rows();


$json = new mysql2json();
echo $json->getJSON(  $rs_tambon , $num );

?>
